home *** CD-ROM | disk | FTP | other *** search
- // Polyray include file: ROOM1.INC
- // by Rob McGregor
- //
- // A basic room with two walls and a floor...
-
-
- // Create the wooden wall texture (could use Polyray's "wooden")
- static define WALL_TEXTURE planar_imagemap(image("Your image file here..."), P, 10)
- static define wood1
- texture {
- special surface { color WALL_TEXTURE }
- scale <0.25, 0.25, 0.25>
- }
-
- // Create the floor texture (could use checkers)
- static define FLOOR_TEXTURE planar_imagemap(image("Your image file here..."), P, 100)
- static define tiles
- texture {
- special surface {
- color FLOOR_TEXTURE // wood
- ambient 0.4
- diffuse 0.4
- specular 0.5
- reflection 0.7
- }
- scale <0.4, 1, 0.4>
- }
-
- static define room2
- object {
- object {
- // (Floor)
- polygon 4, <-1 , 0, 1>, <-1, 0, -1>, <1, 0, -1>, <1, 0, 1>
- scale <10, 1, 10>
- translate <0, -2.5, 0>
- tiles
- }
- +
- object {
- // (Left Wall)
- polygon 4, <0, -1, 1>, <0, 1, 1>, <0, 1, -1>, <0, -1, -1>
- scale <1, 10, 10>
- translate <-10, 5, 0>
- wood1
- }
- +
- object {
- // (Back Wall)
- polygon 4, <-1, 1, 0>, <1, 1, 0>, <1, -1, 0>, <-1 ,-1, 0>
- scale <10, 10, 1>
- translate <0, 5, 10>
- wood1
- }
- }
-
-
-